import Login from '../page/login';
import Article from '../page/article';
import About from '../page/about';
import Board from '../page/board';
import Layout from '../page/layout';
import NotFound from '../page/notfound';
import { createBrowserRouter } from 'react-router-dom';

const router = createBrowserRouter([
    {
        path: '/',
        element: <Layout />,
        children: [
            {
                path: '/about',
                element: <About />,
            },
            {
                path: '/board',
                element: <Board />,
            },
            {
                index: true,
                element: <Article />,
            },
            {
                path: '*',
                element: <NotFound />,
            }
        ],
    },
    {
        path: '/login',
        element: <Login />,
    },
    {
        path: '/articles/:id',
        element: <Article />,
    }
]);

export default router;